#include <func.h>
void func(int sig)
{
    printf("bb%d\n",sig);
    sleep(5);
    printf("a%d\n",sig);
}
int main(int argc,char *argv[])
{
    struct sigaction act;
    memset(&act,0,sizeof(act));
    act.sa_handler=func;
    sigaction(2,&act,NULL);
    char buf[4096];
    memset(buf,0,sizeof(buf));
    read(STDIN_FILENO,buf,sizeof(buf));
    printf("---%s---\n",buf);

    return 0;
}

